package com.itheima.controller;


import com.alibaba.dubbo.config.annotation.Reference;

import com.itheima.domain.Book;
import com.itheima.service.DubService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/hello")
public class DubController {

    @Reference
    private DubService dubService;


    @RequestMapping("/shello")
    @ResponseBody
    public List<Book> sayHello(){

        System.out.println("hello world");
        System.out.println("rush B gogogo!");

        return dubService.sayHello();

    }

}
